{% extends "base_jrcadmin1.html" %}

{% block content %}

    <table>
        <tr>
            <td colspan="3"><b>Monthly information from CSV file: {{ f.original_name }}</b> ({{ f.import_file.name }})</td>
        </tr>
        <tr>
            <th>Month</th>
            <th>Profit</th>
            <th>Quantity of trades</th>
        </tr>
        {% for item_date, values in ar_complete_stat.items %}
            <tr class="{% cycle "row1" "row2" as rowcolor %}">
                <td>
                    {{ item_date }}
                </td>
                {% if values.profit >= 0 %}
                    <td class="profit_trade">
                        {{ values.profit|floatformat:"-5" }}
                    </td>
                {% else %}
                    <td class="non_profit_trade">
                        {{ values.profit|floatformat:"-5" }}
                    </td>
                {% endif %}
                <td>{{ values.trades|length }}</td>
            </tr>
        {% empty %}
			<tr>
				<td colspan="3">Error displayin information!</td>
			</tr>
        {% endfor %}
    </table>

{% endblock %}
